<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
   function User(name){
     this.name = name
   }

   console.dir(User)

   console.log(User.prototype.__proto__ == Object.prototype)

  //  通过原型获取构造函数
  console.log(User.prototype.constructor)

  //  如果修改原型对象
  User.prototype = {
    //  一定要指定回原来的构造函数
    constructor:User,
    show(){
      console.log(this.name)
    }
  }
  let tom = new User.prototype.constructor("tomcat")
  tom.show()

</script>
</html>